package com.oa.service.impl;


import com.oa.mapper.UserRoleMapper;
import com.oa.pojo.UserRole;
import com.oa.service.UserRoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author wsrwy
* @description 针对表【user_role】的数据库操作Service实现
* @createDate 2023-10-22 20:57:53
*/
@Service
public class UserRoleServiceImpl implements UserRoleService{
    @Autowired
    private UserRoleMapper userRoleMapper;
    @Override
    public List<UserRole> selectUserRole(UserRole userRole) {
        List<UserRole> userRoleList = userRoleMapper.selectAll(userRole);
        return userRoleList;
    }
    @Override
    public int deleteUserRole(Integer id) {
        UserRole userRole = new UserRole();
        userRole.setId(id);
        return userRoleMapper.deleteUserRole(userRole);
    }
    @Override
    public int insertUserRole(UserRole userRole) {
        return userRoleMapper.insertUserRole(userRole);
    }
    @Override
    public int updateUserRole(UserRole userRole) {
        return userRoleMapper.updateUserRole(userRole);
    }
}




